package info.casel.splash;

import info.casel.splash.SecondActivity;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Toast;

public class SplashActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags
		(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.activity_splash);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.splash, menu);
		return true;
	}
	public void openActivity(View V){
    	Log.d("CASEL","Opening Another Activity");
    	Intent intent= new Intent(this,SecondActivity.class);
    	intent.putExtra("extraValue", "Hello");
    	startActivity(intent);
    	
    }
	public void openActivityResult(View v){
	 	Log.d("CASEL","Opening Another Activity");
		Intent intent= new Intent(this,AnotherActivity.class);
		startActivityForResult(intent,12);
		
	}

	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		if(requestCode==12){
//			Toast.makeText(this, resultCode, 1).show();
			System.out.println(requestCode);
			System.out.println(resultCode);
			System.out.println();
		}
		
	}
	
 

}
